package icu.study.common.security.constant;

import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.interfaces.JWTVerifier;

import java.util.Calendar;

/**
 * @program: spring security
 * @description:
 * @author: 1246263205@qq.com
 * @create: 2020-10-11 19:14
 */
public class JwtConstant {
    public static final String JWT_HEADER = "ACCESS_TOKEN";
    //密钥
    public static final String SECRET = "asdsdasad@!3123";
    //生成Token过期时间的单位
    public static final Integer EXPIRES_TIME_TYPE = Calendar.HOUR;
    //生成过期时间的时长
    public static final Integer EXPIRES_TIME_AMOUNT = 10;
    //设置加密算法
    public static final Algorithm algorithm = Algorithm.HMAC256(SECRET);
    //验证器
    public static final JWTVerifier jwtVerifier = JWT.require(algorithm).build();


}